﻿using System;
using System.Collections.Generic;
namespace Microsoft.Data.Edm
{
    /// <summary>
    /// Represents an EDM navigation property.
    /// </summary>
    public interface IEdmNavigationProperty : IEdmProperty, IEdmNamedElement, IEdmVocabularyAnnotatable, IEdmElement
    {
        /// <summary>
        /// Gets the partner of this navigation property.
        /// </summary>
        IEdmNavigationProperty Partner
        {
            get;
        }
        /// <summary>
        /// Gets the action to execute on the deletion of this end of a bidirectional association.
        /// </summary>
        EdmOnDeleteAction OnDelete
        {
            get;
        }
        /// <summary>
        /// Gets whether this navigation property originates at the principal end of an association.
        /// </summary>
        bool IsPrincipal
        {
            get;
        }
        /// <summary>
        /// Gets the dependent properties of this navigation property, returning null if this is the principal end or if there is no referential constraint.
        /// </summary>
        IEnumerable<IEdmStructuralProperty> DependentProperties
        {
            get;
        }
        /// <summary>
        /// Gets a value indicating whether the navigation target is contained inside the navigation source.
        /// </summary>
        bool ContainsTarget
        {
            get;
        }
    }
}
